<template>
  <a-modal title="导出文件" :visible="visible" :footer="null" @cancel="() => { $emit('cancel')}">
    <a-spin tip="正在导出中" style="width:20%;margin-left:40%" v-if="status==0">
      <a-icon slot="indicator" type="loading" style="font-size: 24px" spin />
    </a-spin>
    <div v-else class="successbox">
      <img src="../../img/success.png" alt style="width:20%;margin-left:40%" />
      <p style="text-align:center">文件生成成功</p>
      <p style="text-align:center">
        <a :href="'http://admin-dev.qdhrshare.com/download/'+url">点击下载</a>
      </p>
    </div>
  </a-modal>
</template>

<script>
  export default {
    name: 'exportFile',
    props: {
      status: {
        type: Number,
        default: 0
      },
      visible: {
        type: Boolean,
        default: false
      },
      url: {
        type: String,
        default: ''
      }
    }
  }
</script>

<style scoped>

</style>